﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;


/// StudentInfo stud=new StudentInfo();
/// stud.GetRollNo(100);
/// stud.RollNo=-100;  // set
/// int r = stud.RollNo // get




namespace bank.DTOs
{
    public class StudentInfo
    {
        private int _roll;

        public int RollNo
        {
            get
            {
                if (_roll > 0)
                    return _roll;
                else
                    return -999;
            }
            set
            {
                if (value > 0)
                    _roll = value;
            }

        }
        public int Age { set; get; }
        public string Name { get; set; }

        //public int Age { get; set; }
        //public string Name { get; set; }

    }
}
